<SCRIPT type="text/javascript">
function submitForm(){
		$("#mainForm").submit();
}
function controlDiv(id){
	if($("#but"+id).hasClass("a_close")){
		$("#"+id).slideUp(50);
		$("#but"+id).attr("class","tbControlIcon a_open");
	}else{
		$("#"+id).slideDown(50);
		$("#but"+id).attr("class","tbControlIcon a_close");
	}
}
$(document).ready(function(){
	$('.item').on("click",function(){
		if($(this).children().first().children().first()){
			if($(this).children().first().children().first().attr("checked")=="checked"){
				  $(this).children().first().children().first().click();
			}else{
				 $(this).children().first().children().first().attr("checked","checked");
			}
		}
	})
});
</SCRIPT>
<div class="artCon">
	<div class="middleArt">
	<form method="post" action="" name="organaddForm" data-toggle="form" id="organaddForm" class="form-horizontal">
		<div class="artMain">
			<div class="mainCenter" style="height:400px;overflow:auto;">
				 <table class="table_style_1" >
				 	<thead>
				 		<th style="width:50px;">&nbsp;</th>
				 		<th style="width:100px;">预警项</th>
				 		<th style="width:240px;">描述</th>
				 	</thead>
				 	<#if datas ??>
				 		<#list datas as da>
						 	<tbody>
						 		<tr>
						 			<td class="minSize" style="border-bottom:1px solid #cccccc;">
										<a href="#" onclick="controlDiv('${da.id}')">
											<i id="but${da.id}" class="tbControlIcon a_close" style="height:16px;width:16px"></i>
										</a>
									</td>
									<td colspan="2" style="border-bottom:1px solid #cccccc;"><h4>${da.title!""}</h4></td>
						 		</tr>
					 		</tbody>
						 	<#if propertiesList??>
						 		<tbody id="${da.id}">
									<#list propertiesList as properties>
										<#assign templateSource = "${properties.groupid}"> 
										<#if da.name ?? && da.name = templateSource>
									 		<tr class="item">
									 			<td style="width:50px;text-align: right;">
									 				<input type="checkbox" name = "check" value="${properties.id}"/>
									 			</td>
									 			<td style="width:100px;" title="${properties.description!''}">
									 				${properties.title!''}
									 			</td>
									 			<td style="width:240px;color: #CCCCCC" title="${properties.description!''}">
									 				<#if properties.description ?? && properties.description?length gt 25>
									 					${properties.description[0..25]}
									 				<#else>
										 				${properties.description!""}
									 				</#if>
									 			</td>
									 		</tr>
										 </#if>
									</#list>
								</tbody>
							</#if>
						</#list>
					 </#if>		
				 </table>
			</div>
		</div>
		<div class="mainCenter">
		</div>
		<div class="bottomBg">
			<div class="btnWrap">
				<input type="submit" class="subButtonStyle" value="确认"/>
				<input type="button" onclick="closeR3ArtDialog()" class="cancelButtonStyle" value="取消"/>
			</div>
		</div>
	</form>
	</div>
</div>

